home *** CD-ROM | disk | FTP | other *** search
/ MacHack 1996 / MacHack 1996.toast / Presentations / Presentations ’92 / PatchWorks Kit / <PatchWorks++> / GlobalPatch.h < prev    next >
Text File  |  1992-06-15  |  756b  |  38 lines

  1. /*
  2.     GlobalPatch.h
  3.     
  4.     Sub-class of TrapPatch that uses the SetTrapAddress available at INIT time
  5.     to patch in every context of the system.
  6.     
  7.     Part of PatchWorks, the Extension Development Framework.
  8.     
  9.     by Mouse Herrell & Patrick Beard.
  10.     
  11.     Permission is granted to use this source code for any purpose, as long
  12.     as the copyright notice is maintained.
  13.     
  14.     © 1992 Berkeley Systems, Inc.
  15.  */
  16.  
  17. #pragma once
  18.  
  19. #ifndef __GLOBAL_PATCH__
  20. #define __GLOBAL_PATCH__
  21.  
  22. #include "GenericPatch.h"
  23.  
  24. class GlobalPatch : public GenericPatch {
  25. public:
  26.     static void SaveTrapAddresses(void);
  27.  
  28. protected:
  29.     virtual    PatchProcPtr Get(void);
  30.     virtual    void Set(PatchProcPtr proc);
  31.     
  32. private:
  33.     static PatchProcPtr theirGetTrapAddress;
  34.     static PatchProcPtr theirSetTrapAddress;
  35. };
  36.  
  37. #endif
  38.